#!/usr/bin/env python
#-*- coding:utf-8 -*-

import os
import sys

py3path = '/cygdrive/c/Python31/python.exe'

if os.path.exists(py3path) and os.path.isfile(py3path):
    # Change the script path from CygWin to Windows
    for i in range(1,len(sys.argv)):
        if '.py' in sys.argv[i]:
            os.chdir(os.path.dirname(sys.argv[i]))
            sys.argv[i] = os.path.basename(sys.argv[i])
            break
            
    os.system('%s %s' %(py3path, ' '.join(sys.argv[1:])))
else:
    print('Python 3.1 is not installed in you system')
